<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rs="http://risksoft.com/facelets">
	
	<!--  "home.xhtml" will implement the "insertTemplate.xhtml" page,
	inheriting the appearance of that template.
	
	using the template can be done by 
		<ui:decorate
		and
		<ui:composition
		tags.
		 
	 -->
	
	<div style='background-color:green; border:2px solid red'>
		
		<!-- this tag will implement the template. -->
		<ui:decorate template="WEB-INF/templates/insertTemplate.xhtml">
	
			<ui:define name="sidemenu">
			
				 <rs:menu menus="#{menuBackingBean.menus}"/>
				 
				<!-- this tag will implement the template.
				<ui:include src="sideMenuFragment.xhtml"></ui:include>
				<ui:param name="menus" value="#{menuBackingBean.menus}"></ui:param>
				-->
			</ui:define>
			
			<!--  this defined contents will override values with those names on the template. -->
			<ui:define name="content">
			    This is an example of a simple Facelets template.<br/>
		        Here Header, Footer and Side Menu bar appears from template.(insertTemplate.xhtml)<br/>
		        This section appears from templateClient.(home.xhtml)
			</ui:define>
		</ui:decorate>
		
	</div>
</html>